package com.zjq.designpatterns.creation.builder.code.v1;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

/**
 * 教练类：
 * 用来做拼装工作
 * @author jessie
 * @version 1.0
 * @date 2021/1/22
 */
public class Coach {
    private CourseBuilder courseBuilder;

    //set注入
    public void setCourseBuilder(CourseBuilder courseBuilder) {
        this.courseBuilder = courseBuilder;
    }

//    private String courseName;
//    private String coursePPT;
//    private String courseVideo;
//    private String courseArticle;
//    //问答
//    private String courseQA;
    public Course makeCourse(String courseName, String coursePPT,
                             String courseVideo, String courseArticle,String courseQA){
        this.courseBuilder.buildCourseName(courseName);
        this.courseBuilder.buildCourseArticle(courseArticle);
        this.courseBuilder.buildCoursePPT(coursePPT);
        this.courseBuilder.buildCourseQA(courseQA);
        this.courseBuilder.buildCourseVideo(courseVideo);
        return this.courseBuilder.makeCourse();
    }
}
